package cn.biplam.front.component.view.systemManage.menu;

import cn.biplam.common.client.DbResource;
import cn.biplam.common.wrapper.ErrorMessage;
import cn.biplam.common.wrapper.UserInfo;
import cn.biplam.front.component.AjxResponse;
import cn.biplam.front.html.base.HtmlWindow;
import cn.biplam.front.template.control.SlipMenu;

/**
 * 系统菜单
 */
public class SystemMenu extends AjxResponse{

	/**当前容器id */
	public static final String cId="8001";
	/**当前容器的行为id */
	public static final String actionId = cId+"01";
	/**树的节点对象 */
	private HtmlWindow tree;

	@Override
	protected HtmlWindow ajxGet() throws ErrorMessage {
		return tree;
	}

	/**
	 * 树的代码
	 * @param user  用户信息
	 * @param homeUrl 系统路径
	 * @return HtmlWindow
	 * @throws ErrorMessage
	 */
	public HtmlWindow get(UserInfo user, String homeUrl) throws ErrorMessage {
		/**放入左部导航*/
		HtmlWindow menu=new SlipMenu(
				cId,
				"menu",
				"1",
				"domain",
				new DbResource(),
				homeUrl,
				user
		).get();

		return menu;
	}
}
